// 封装处理图片异常指令
export const imgerror = {
  inserted(el, binding) {
    el.onerror = function() {
      el.src = binding.value
    }
    // 检查图片是否为空
    el.src = el.src || binding.value
  },
  componentupdated(el, binding) {
    el.src = el.src || binding.value
  }
}
